package level.editor.view.action.edit;

import java.awt.event.ActionEvent;

import level.editor.control.main.Main;
import level.editor.control.main.MainTabbed;
import level.editor.view.action.ActionConstants;

public class RedoAction extends EditAction
{

	public RedoAction(MainTabbed tabbed)
	{
		super("Redo", tabbed, ActionConstants.ICON_DIR + "redo.png");
	}

	@Override
	public void actionPerformed(ActionEvent e)
	{
		if (tabbed.getSelectedMain() != null)
		{
			Main main = tabbed.getSelectedMain();
			if (main.redo())
			{
				main.setDirty(Main.DIRTY);
			}
		}
	}
}
